var table_field = null;
var table_view = null; 
table_field = [
    {
        tablename: "yk_main_1",//公用的信息
        fields: {
            id: { des: "id", type: "INT(11) PRIMARY KEY" },
            deviceid:{des:"设备id",type:"varchar(20)"},
            fid: { des: "描述", type: "varchar(20)" },
            cycle: { des: "周期", type: "tinyint(2)" },
            sig: { des: "信号强度", type: "tinyint(2)"},
            dl: { des: "电量", type: "tinyint(2)"}
        }
    },
    {
        tablename: "yk_datasub_1",//数据表
        cmd:0x0202,
        fields: {
            id: { des: "id", type: "INT(11) PRIMARY KEY" },
            deviceid: { des: "设备id", type: "varchar(20)" },
            time: { des: "时间戳", type: "datetime" },
            name: { des: "传感器名称", type: "varchar(20)" },
            value: { des: "值", type: "float(8)" },
            point_num: { des: "小数位数", type: "tinyint(2)" },
            dm: { des: "正负", type: "tinyint(2)" }
        }
    },
];
table_view = [
    {
        tablename: "view_log_1",
        type: "left",
        table: {
            left: {
                name: "device",
                fields: "*"
            },
            right: {
                name: "project",
                fields: "name"
            }
        },
        where: "on a.projectid = b.id",
    }
];

exports.table_field = table_field;
exports.table_view = table_view;
